#ifndef __CrazyTollgateLayer__
#define __CrazyTollgateLayer__

#include "cocos2d.h"
#include "scene/CrazyTollgateScene/CrazyRocketManager/CrazyRocketManager.h"

USING_NS_CC;

class CrazyTollgateLayer : public CCLayer{
public:
	CrazyTollgateLayer();
	~CrazyTollgateLayer();

	CREATE_FUNC(CrazyTollgateLayer);
	virtual bool init();

private:
	void loadBackGround(int bgMoveLayer);

	void setRolling(int curY);

	void bgMove(CCObject* pData);

	void moveByMedia(float dt);

	void createcountDownAnimation();

	void callbackUpdate();

private:
	CrazyRocketManager* m_crazyRocketManager;

	int m_aveValue;

	int m_mediaCount;

	int m_curBg;

	CCSprite* m_bgSpritr[2];

	int m_maxLayer;

	int m_curLevel;

	CCSprite* m_countDownSprite;

	CCSprite* m_tip;

	bool m_isCountDown;

	float m_soundLessThanValue;
};
#endif // !__CrazyTollgateLayer__
